package cn.training.controller;

import java.util.List;

import jp.terasoluna.fw.dao.QueryDAO;
import jp.terasoluna.fw.dao.UpdateDAO;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;



@Service
public class helloworldservice {
	
	@Autowired
	QueryDAO queryDao;
	
	@Autowired
	UpdateDAO updateDao;    
	
	public UserBean chusersear(UserBean frm){
		UserBean result = queryDao.executeForObject("User.selectUser",frm, UserBean.class);
		//frm.setUserId("test")
		return result;
	}

	
	/*
	public int searchinsert(UserBean userBean) {
		// TODO Auto-generated method stub
		return updateDao.execute("User.insertUser",userBean);
	}
	
	
	
	public UserBean searchname(UserBean nn){
		UserBean result=queryDao.executeForObject("User.selectname",nn, UserBean.class);
		//frm=queryDao.executeForObject("User.selectUser",frm, UserBean.class);

		//frm.setUserID("test");
		return result;
	}
	public int updateUser(UserBean kk){
		//frm=queryDao.executeForObject("User.selectUser",frm, UserBean.class);
		return updateDao.execute("User.updateUser",kk);
		//frm.setUserID("test");
	}
	*/
	
	
	public List<UserBean> nameall(UserBean form){
	 List<UserBean> result = queryDao.executeForObjectList("User.selectname",form );
		//frm.setUserId("test")
		return result;  
	}
	
	//用户登录
	
	
	
}